# Contributor: Fabio Aires <fabioaires.web@gmail.com>
# Maintainer: Fabio Aires <fabioaires.web@gmail.com>
pkgname=nikto
pkgver=2.1.6
pkgrel=4
pkgdesc="A web application security scanner"
url="https://www.cirt.net/Nikto2"
arch="noarch"
license="GPL-2.0-only"
options="!check" # No test suite
depends="perl nmap openssl"
source="$pkgname-$pkgver.tar.gz::https://github.com/sullo/nikto/archive/$pkgver.tar.gz
	nikto.conf.base
	CVE-2018-11652.patch"
builddir="$srcdir/$pkgname-$pkgver/program"

# secfixes:
#   2.1.6-r2:
#     - CVE-2018-11652

package() {
	mkdir -p "$pkgdir"/etc/nikto "$pkgdir"/usr/bin
	cp "$srcdir"/nikto.conf.base "$pkgdir"/etc/nikto.conf
	cp -r databases "$pkgdir"/etc/nikto
	cp -r templates "$pkgdir"/etc/nikto
	cp -r plugins "$pkgdir"/etc/nikto
	cp -r docs "$pkgdir"/etc/nikto
	install -m 755 nikto.pl  "$pkgdir"/usr/bin
}

sha512sums="
13632018ef6862de7dc53c674d7266fcfb7e164bcf3070327c103cbf8737720ffb710ccc8949acc920a6e0a85da1bb7575d073ee245bc2ba3a8a292ad1695e69  nikto-2.1.6.tar.gz
d6e349bd20428e45d6ef49db91630e1c6d65d4cf2107a1f4c58e697d8fceeb428fb90c247fbbf8a8ad6f9d27672790d07040079b94c2480dd77dc445fccd6f69  nikto.conf.base
c8be4198d6112f7cdcf21ca9a11baff39c0e7f6f63ff364b6bece8362beb4d1393ba0ed1f88ed9273fcf6bad7f8c81e46d73566cb56f0ee017898ddef799cae0  CVE-2018-11652.patch
"
